{% extends "base_layout.html" %}

{% block title %}{{action_title}}{% endblock title%}

{% block content %}
<div class="box">
  {% if message %}
  {{message}}
  {% endif %}
  <form action="{{url_for('edit_project_action')}}" method="post" id="project">
    <fieldset>
      <legend>Project: JsonCpp</legend>
      <div>
        <label for="slug_name" class="required">Short Name:</label>
        <input name="slug_name" type="text" id="slug_name"
               class="required" value="{{project.slug_name}}"/>
      </div>
      {% if 'slug_name' in field_errors %}
      <div> {{field_errors['slug_name']}} </div>
      {% endif %}
      <div>
        <label for="name" class="required">Display Name:</label>
        <input name="name" type="text" id="name"
               value="{{project.name}}"/>
      </div>
      <div>
        <label for="created">Since:</label>
        <span id="created">{{project.created | verbose_datetime_format}}</span>
      </div>
      <div>
        <label for="modified">Last modified:</label>
        <span id="modified">{{project.modified | verbose_datetime_format}}</span>
      </div>
      <input type="hidden" name="key" value="{{project.key}}">
      {# post_uuid is used to detect double submit #}
      <input type="hidden" name="post_uuid" value="{{post_uuid}}">
      <div class="submit">
        <p class="deletelink"><a href="prj_jsoncpp_delete.html" class="deletelink">Delete</a></p>
        <!-- <label></label> empty label if deletelink is omitted -->
        <input type="submit" name="_action_save" value="Save" class="default" />
        <input type="submit" name="_action_continue" value="Save and continue editing"/>
        <input type="submit" name="_action_add_another" value="Save and add another"/>
      </div>
    </fieldset>
  </form>
</div>
{% endblock content%}
